﻿using System;

namespace woaC2.LogicLib.GlobalShare
{
    public sealed class TimeLineGS
    {
        #region Singleton
        private TimeLineGS()
        {
        }

        public static TimeLineGS instance
        {
            get
            {
                return Nested.instance;
            }
        }

        private class Nested
        {
            static Nested()
            {
            }

            internal static readonly TimeLineGS instance = new TimeLineGS();
        }
        #endregion

        private static DateTime _startTime;

        public void Start()
        {
            _startTime = DateTime.Now;
        }

        /// <summary>
        /// Lấy thời gian hiện tại 
        /// </summary>
        public int currentTime
        {
            get
            {
                return (int)((DateTime.Now - _startTime).TotalSeconds);
            }
        }
    }
}
